/**
 * 玩家模块
 * @author: jinlu.nomospace
 * @date: 12-5-9
 */
define(function(require, exports, module) {
    var Class = require('class');
    var Player = Class.create({
        initialize: function() {
            this.role = {
                'Lord': 0,
                'Loyalist': 1,
                'Rebel': 2,
                'Renegade': 3
            };
            this.phase = {
                'RoundStart': 0,
                'Start': 1,
                'Judge': 2,
                'Draw': 3,
                'Play': 4,
                'Discard': 5,
                'Finish': 6,
                'NotActive': 7
            }
        },
        getHp: function() {

        },
        getMaxHp: function() {

        },
        getLostHp: function() {
            return 0;
        },
        isWounded: function() {

        },
        getGender: function() {

        },
        getKingdom: function() {

        },
        getKingdomIcon: function() {

        },
        getKingdomFrame: function() {

        },
        getSeat: function() {

        },
        getPhase: function() {

        },
        isAlive: function() {

        },
        isDead: function() {

        },
        setAlive: function() {

        },
        distanceTo: function(other) {

        },
        isLord: function() {

        },
        setEquip: function(equipCard) {

        },
        removeEquip: function(equipCard) {

        },
        hasEquip: function(equipCard) {

        },
        getEquips: function() {
            return list;
        },
        addDelayedTrick: function() {

        },
        removeDelayedTrick: function() {

        },
        getJudgingArea: function() {
            return card;
        },
        getHandcardNum: function() {

        },
        getCardCount: function(includeEquip) {

        },
        removeCard: function() {

        },
        addCard: function() {

        },
        getWeapon: function() {

        },
        getArmor: function() {

        },
        getDefensiveHorse: function() {

        },
        getOffensiveHorse: function() {

        },
        hasWeapon: function(name) {

        },
        hasArmorEffect: function(name) {

        },
        setChained: function(chained) {

        },
        isChained: function() {

        },
        canSlash: function(other, distanceLimit) {

        },
        isLastHandCard: function(card) {

        },
        hasFlag: function(flag) {
            return this.flags.contains(flag)
        },
        clearFlag: function() {
            this.flags.clear();
        },
        canSlashWithoutCrossbow: function() {
            if (this.hasSkill('paoxiao')) {
                return true;
            }
            var slashCount = this.getSlashCount(),
                validSlashCount = 1;
            return slashCount < validSlashCount;
        },
        hasSkill: function(name) {

        },
        hasLordSkill: function(name) {

        },
        getSlashCount: function() {
            var history = this.history;
            return history['Slash'] + history['FireSlash'] + history['ThunderSlash'];
        }
    });

    var Weapon = Class.create({
        initialize: function() {
            console.log('Weapon');
        }
    });
    module.exports = Player;
});
